// pages/test/index.js
Page({
    data:{
      list:[
        {name:'mary',socre:{js:100,miniapp:90,php:81}},
        {name:'kitty',socre:{js:100,miniapp:90,php:82}},{name:'lissa',socre:{js:100,miniapp:90,php:83}},
        {name:'tom',socre:{js:100,miniapp:90,php:84}},
        {name:'john',socre:{js:100,miniapp:90,php:85}}
      ]
    },
    click(e){
      console.log(e)
      const index = e.currentTarget.dataset.id
      const sum= this.data.list[index].socre.js +
                  this.data.list[index].socre.miniapp +
                  this.data.list[index].socre.php
      wx.showToast({
        title: this.data.list[index].name+'总分:'+sum,
      })
    }
  }
)